<?php


namespace app\index\model;


use think\Db;
use think\Model;

class Jymd extends Model
{

    protected $table = 'xt_jymd';

    /**根据条件增加一个单项
     * 传入检验仪器，项目名称，
     */
    public function AddJymdby($jymddh, $jymdmc, $pym, $bbzl, $jyyq)
    {

    }

    /***
     * 获取检验目的的排序  检验目的排序
     */
    public function GetJymdDhDesc($jymddh)
    {

        return Db::query("select jymddh  from xt_jymd where jymddh like :jymddh ORDER BY jymddh DESC", ['jymddh' => $jymddh]);

    }


    /***
     * 查询我的项目编号排序 方便添加  检验目的代号  大项
     */
    public function GetJymdBh()
    {
        return $res = $this->where('jymddh', 'like', 'ac%')
            ->field('jymddh,jymdmc,jyyq,iszh')
            ->order('jymddh DESC')
            ->find()
            ->toArray();
    }

  /*  public function get()
    {
        $this->GetJymdBh();
    }*/
}